﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class dzsw : System.Web.UI.Page
{
    News n = new News();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack) 
        {
            BindDzswNews();
            BindDzswGxjs();
            BindFAQ();
            BindZFWZ();
            BindDZSW();
            BindQYWZ();
            this.Label1.Text = n.GetContentByCid(314);
            this.Label2.Text = n.GetContentByCid(315);
            this.Label3.Text = n.GetContentByCid(319);
            this.Label4.Text = n.GetContentByCid(320);
            this.Label5.Text = n.GetContentByCid(321);
        }
    }

    public void BindDzswNews()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 3 * from news where classid=316 order by id desc", dt);
        this.DataList1.DataSource = dt;
        this.DataList1.DataBind();
    }

    public void BindDzswGxjs()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 3 * from news where classid=317 order by id desc", dt);
        this.DataList2.DataSource = dt;
        this.DataList2.DataBind();
    }

    public void BindFAQ()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 3 * from news where classid=318 order by id desc", dt);
        this.DataList3.DataSource = dt;
        this.DataList3.DataBind();
    }

    public void BindZFWZ()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 3 * from news where classid=311 order by id", dt);
        this.DataList4.DataSource = dt;
        this.DataList4.DataBind();
    }

    public void BindDZSW()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 3 * from news where classid=312 order by id", dt);
        this.DataList5.DataSource = dt;
        this.DataList5.DataBind();
    }

    public void BindQYWZ()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 3 * from news where classid=313 order by id", dt);
        this.DataList6.DataSource = dt;
        this.DataList6.DataBind();
    }
}
